package cn.hsw.component.redis;

/**
 * 内部api调用失败异常
 * @author 李子木
 * @date 2020-11-10
 */
public class RedisException extends RuntimeException {

    private final static int CODE = 516;
    private final static String MSG = "redis异常";

    private static final long serialVersionUID = 7479935208136451091L;
    private int code;

    public RedisException(){
        super(MSG);
        this.code = CODE;
    }

    public RedisException(String message) {
        super(message);
        this.code = CODE;
    }

    public RedisException(int code, String message) {
        super(message);
        this.code = code;
    }

    public int getCode(){
        return this.code;
    }
}
